@extends('admin.base.index')
@section('content')
<div class="block-area" id="tableStriped">
                    <h3 class="block-title">购物车主页</h3>
                    <form action="" method="post" name="myform">
                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                        <input type="hidden" name="_method" value="DELETE">
                    </form>
                    <div class="table-responsive overflow">
                        <table class="tile table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <td align="center">carid</td>
                                    <td align="center">goodsid</td>
                                    <td align="center">userid</td>
                                    <td align="center">goodsnum</td>
                                    <td align="center">goodsprice</td>
                                    <td align="center">goodsname</td>
                                </tr>
                            </thead>
                            <tbody>
                             @foreach($list as $v)
                                <tr>
                                    <td align="center">{{ $v->carid }}</td>
                                    <td align="center">{{ $v->goodsid }}</td>
                                    <td align="center">{{ $v->userid }}</td>
                                    <td align="center">{{ $v->goodsnum }}</td>
                                    <td align="center">{{ $v->goodsprice }}</td>
                                    <td align="center">{{ $v->goodsname }}</td>
                                    <td align="center">
                    					<a href="javascript:doDel({{ $v->carid }})">
                                            <button class="btn-info">删除</button>
                                        </a>&nbsp;&nbsp;|&nbsp;&nbsp;
                   			 		</td>
                                </tr>
                             @endforeach
                            </tbody>
                        </table>
                        <script type="text/javascript">
                            function doDel(id)
                            {
                                if(confirm('确定要删除吗???')){
                                    var form = document.myform;
                                    form.action = '/admin/car/'+id;
                                    form.submit();
                                }
                            }
                        </script>
                    </div>
                </div>
@stop
